using System;
using System.Collections.Generic;
using System.Text;
using DataBaseManager;
using System.Data;
 

namespace BLGPS
{   
    class BaseDatos
    {
        private static Database m_database;

        public static Database DB
        {
            get
            {
                if (m_database == null)
                {
                    m_database = new Database(eDataBaseProvider.SQLServer, Configuration.Current.ConnectionString);
                    //if (System.IO.File.Exists(Configuration.Current.PathDB))
                    //{
                        
                    //}
                    //else
                    //{
                    //    throw new System.IO.FileNotFoundException("No se encuentra la base de datos."); 
                    //}                   
                    
                }
                
                return m_database;


            }
        }
    }   

    internal static class MyTables
    {
        public static TableName TipoVehiculo
        {
            get
            {
                return new TableName("TIPO_VEHICULO");
            }
        }
        public static TableName Chofer
        {
            get
            {
                return new TableName("CHOFER");
            }
        }
        public static TableName Vehiculo
        {
            get
            {
                return new TableName("VEHICULO");
            }
        }
        public static TableName Dispositivo
        {
            get
            {
                return new TableName("DISPOSITIVO");
            }
        }
        public static TableName TipoDispositivo
        {
            get
            {
                return new TableName("TIPO_DISPOSITIVO");
            }
        }
        public static TableName DispositivoXCamion
        {
            get
            {
                return new TableName("DISPOSITIVOXCAMION");
            }
        }
        public static TableName Empresa
        {
            get
            {
                return new TableName("EMPRESA");
            }
        }
        public static TableName Movimiento
        {
            get
            {
                return new TableName("MOVIMIENTO");
            }
        }
         public static TableName Usuario
        {
            get
            {
                return new TableName("USUARIO");
            }
        }
         public static TableName Flota
         {
             get
             {
                 return new TableName("FLOTA");
             }
         }
    }
}